﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Atom.Common.Configuration;
using Atom.Common.ResourceProvider;

namespace Atom.Common
{
     public static class ResourceProviderFactory
    {
        public static IResourceProvider GetResourceProvider()
        {
            ResourceSettings settings = ResourceSettings.GetConfiguration();
            return GetResourceProvider(settings.DefaultProvider);
        }

        public static IResourceProvider GetResourceProvider(string name)
        {
            ResourceSettings settings = ResourceSettings.GetConfiguration();
            return settings.Providers.GetConfigurationElement(name).CreateProvider();
        }
    }
}
